using UnityEngine;

public class UIFollowObject : MonoBehaviour
{
    public Transform m_label;
    [Range(50, 200)] public int m_yOffset = 50;

    void Update()
    {
        var pos = Camera.main.WorldToScreenPoint(transform.position);
        pos.y += m_yOffset;
        m_label.position = new Vector3(pos.x, pos.y);
    }
}
